<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>04-普通函数</title>

</head>
<body>

<script>
    function method01(){
        console.log("hello");
    }

    method01()
    function method02(a,b){
        console.log(a + b);
    }
    method02(1,2)
    function method03(a,b){
        return a + b;
    }
    let result = method03(1,3)
    console.log(result);

    function method04(){
        let sum = 0;
        for (let i = 0; i < arguments.length; i++) {
            sum += arguments[i]
        }
        return sum;
    }
    let result2 = method04(1,2,3,4,5,6,7,8)
    console.log(result2);

</script>

</body>
</html>